Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
SyntaxError:Token inesperado, esperado ","

Error en sí mismo

Cómo se ve en VScode

Ese es el componente Toollsit

 import React, { Component } from 'react'; import Toolitem from './Toolitem' import App from '../App'; const styles = { ul:{ listStyle:"none", width:"300px" } } export default function Toollsit(toto,title){ return( {toto.map((toto)=>{return (<Toolitem toto={toto} />)})} ); };

Esa es la importación del componente Toolitem React from 'react';

 const Toolitem = ({toto}) => { return ( <div> <li> {toto.title} </li> </div> ); }; export default Toolitem;

Y esa es mi App.js

 import react from 'react'; import Toollsit from './components/Toollsit' function App(props) { const toto =[ {id:1,title:'First',completed:true}, {id:2,title:'Second',completed:false}, {id:3,title:'Third',completed:true}, ]; return ( <span className="wrapper"> <Toollsit toto={toto} /> </span> ); } export default App;

Gracias por cualquier ayuda, crítico. Realmente aprecio tus comentarios.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe colocar la función de map en la etiqueta <React.Fragment> (equivalente: <> ). Además, los argumentos deben ser objetos destruidos.

 export default function Toollsit({toto, title}){ return(<> {toto.map((toto)=>{return (<Toolitem toto={toto} />)})} </>); };
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!